Explicitly close the TLS connection
Just to be nice.
This commit is contained in:
parent
9bed890aa8
commit
0a772ff139
1
chat.c
1
chat.c
@ -269,5 +269,6 @@ int main(int argc, char *argv[]) {
|
||||
};
|
||||
handle(msg);
|
||||
|
||||
ircClose();
|
||||
uiHide();
|
||||
}
|
||||
|
1
chat.h
1
chat.h
@ -130,6 +130,7 @@ void ircRecv(void);
|
||||
void ircSend(const char *ptr, size_t len);
|
||||
void ircFormat(const char *format, ...)
|
||||
__attribute__((format(printf, 1, 2)));
|
||||
void ircClose(void);
|
||||
|
||||
extern struct Replies {
|
||||
size_t join;
|
||||
|
6
irc.c
6
irc.c
@ -273,3 +273,9 @@ void ircRecv(void) {
|
||||
len -= line - buf;
|
||||
memmove(buf, line, len);
|
||||
}
|
||||
|
||||
void ircClose(void) {
|
||||
int error = tls_close(client);
|
||||
if (error) errx(EX_IOERR, "tls_close: %s", tls_error(client));
|
||||
tls_free(client);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user