mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2025-04-29 16:30:29 +05:30
Add null check for pubsub.
This commit is contained in:
parent
a1ed146924
commit
e03f2661b4
@ -44,15 +44,16 @@ public class Main {
|
|||||||
Collections.shuffle(channels);
|
Collections.shuffle(channels);
|
||||||
|
|
||||||
for (String channelId : channels)
|
for (String channelId : channels)
|
||||||
Multithreading.runAsyncLimitedPubSub(() -> {
|
if (channelId != null)
|
||||||
Session sess = DatabaseSessionFactory.createSession();
|
Multithreading.runAsyncLimitedPubSub(() -> {
|
||||||
try {
|
Session sess = DatabaseSessionFactory.createSession();
|
||||||
ResponseHelper.subscribePubSub(channelId, sess);
|
try {
|
||||||
} catch (IOException | InterruptedException e) {
|
ResponseHelper.subscribePubSub(channelId, sess);
|
||||||
e.printStackTrace();
|
} catch (IOException | InterruptedException e) {
|
||||||
}
|
e.printStackTrace();
|
||||||
sess.close();
|
}
|
||||||
});
|
sess.close();
|
||||||
|
});
|
||||||
|
|
||||||
s.close();
|
s.close();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user