Commit 281e708 1 parent ab84b19 commit 281e708 Copy full SHA for 281e708
File tree 5 files changed +12
-5
lines changed
src/main/java/cryptomessenger/desktop/infrastructure/client/websocket
5 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 7
7
<parent >
8
8
<groupId >org.example</groupId >
9
9
<artifactId >crypto-messenger</artifactId >
10
- <version >1.1.1 </version >
10
+ <version >1.1.2 </version >
11
11
</parent >
12
12
13
13
<artifactId >crypto-messenger-coder</artifactId >
Original file line number Diff line number Diff line change 7
7
<parent >
8
8
<groupId >org.example</groupId >
9
9
<artifactId >crypto-messenger</artifactId >
10
- <version >1.1.1 </version >
10
+ <version >1.1.2 </version >
11
11
</parent >
12
12
13
13
<artifactId >crypto-messenger-desktop</artifactId >
Original file line number Diff line number Diff line change @@ -54,13 +54,20 @@ private void connect() {
54
54
}
55
55
56
56
public void refreshSubscriptions () {
57
- subscriptions .forEach (Subscription ::unsubscribe );
57
+ subscriptions .forEach (this ::unsubscribe );
58
58
subscriptions = messageHandlers .stream ()
59
59
.map (this ::subscribe )
60
60
.flatMap (Optional ::stream )
61
61
.collect (toSet ());
62
62
}
63
63
64
+ private void unsubscribe (Subscription subscription ) {
65
+ try {
66
+ subscription .unsubscribe ();
67
+ } catch (Exception e ) {
68
+ }
69
+ }
70
+
64
71
private Optional <Subscription > subscribe (MessageHandler handler ) {
65
72
var handlerName = handler .getClass ().getSimpleName ();
66
73
try {
Original file line number Diff line number Diff line change 7
7
<parent >
8
8
<groupId >org.example</groupId >
9
9
<artifactId >crypto-messenger</artifactId >
10
- <version >1.1.1 </version >
10
+ <version >1.1.2 </version >
11
11
</parent >
12
12
13
13
<artifactId >crypto-messenger-server</artifactId >
Original file line number Diff line number Diff line change 6
6
7
7
<groupId >org.example</groupId >
8
8
<artifactId >crypto-messenger</artifactId >
9
- <version >1.1.1 </version >
9
+ <version >1.1.2 </version >
10
10
<packaging >pom</packaging >
11
11
12
12
<modules >
You can’t perform that action at this time.
0 commit comments