Skip to content

Commit e7526dd

Browse files
deadlightrealMorcules
authored andcommitted
Quick fix
1 parent 851f533 commit e7526dd

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/initialize_client_socket.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,7 @@ struct SwiftNetClientConnection* swiftnet_create_client(const char* const ip_add
127127

128128
pcap_t* const pcap = swiftnet_pcap_open(loopback ? LOOPBACK_INTERFACE_NAME : default_network_interface);
129129
if (unlikely(pcap == NULL)) {
130-
PRINT_ERROR("Failed to open bpf");
131-
exit(EXIT_FAILURE);
130+
return NULL;
132131
}
133132

134133
struct SwiftNetClientConnection* const new_connection = construct_client_connection(loopback, port, addr.s_addr, pcap);

src/initialize_server_socket.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ struct SwiftNetServer* swiftnet_create_server(const uint16_t port, const bool lo
5757
pcap_t* const pcap = swiftnet_pcap_open(loopback ? LOOPBACK_INTERFACE_NAME : default_network_interface);
5858
if (unlikely(pcap == NULL)) {
5959
PRINT_ERROR("Failed to open bpf");
60-
exit(EXIT_FAILURE);
60+
return NULL;
6161
}
6262

6363
struct SwiftNetServer* const new_server = construct_server(loopback, port, pcap);

0 commit comments

Comments
 (0)