MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / receiveSynchronousResponse

Function receiveSynchronousResponse

src/replication.cpp:3087–3097  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3085}
3086
3087char *receiveSynchronousResponse(redisMaster *mi, connection *conn) {
3088 char buf[256];
3089 /* Read the reply from the server. */
3090 if (connSyncReadLine(conn,buf,sizeof(buf),g_pserver->repl_syncio_timeout*1000) == -1)
3091 {
3092 return sdscatprintf(sdsempty(),"-Reading from master: %s",
3093 strerror(errno));
3094 }
3095 mi->repl_transfer_lastio = g_pserver->unixtime;
3096 return sdsnew(buf);
3097}
3098
3099/* Send a pre-formatted multi-bulk command to the connection. */
3100char* sendCommandRaw(connection *conn, sds cmd) {

Callers 2

syncWithMasterFunction · 0.85

Calls 4

connSyncReadLineFunction · 0.85
sdscatprintfFunction · 0.85
sdsemptyFunction · 0.85
sdsnewFunction · 0.85

Tested by

no test coverage detected